<?php

namespace App\Http\Controllers;

use App\Models\Video;
use Illuminate\Http\Request;

class VideoController extends Controller
{
    public function index()
    {


    }
    public function create()
    {
        return view('admin.video-create');


    }
    public function store(Request $request)
    {

    }
    public function edit($id)
    {
        return view("admin.video-edit");
    }


    public  function update($id,Request $request)
    {

    }
    public function destroy($id)
    {

    }
    public function VideoList(){
        return view('admin.video');
    }
    public function jiangtang(){

        return view('front.conf');

    }
    public function review(){
        $ovideo=video::orderby('created_at','desc')->paginate(5);
        return view('front.review')->with('ovideo',$ovideo);
    }
    public function reviewinfo($id){
        $video=Video::find($id);
        $ovideo=Video::where('id','!=',$id)->take(1)->get();
        return view('front.review-info')->with('video',$video)->with('ovideo',$ovideo);
    }

}
